<!DOCTYPE html>
<html>
<head>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>Welcome</title>
<meta name="renderer" content="webkit" /> 
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="/static/css/style.css" rel="stylesheet" type="text/css" />
<link href="/static/css/skin.css" rel="stylesheet" type="text/css" />
<link href="/static/css/balls.css" rel="stylesheet" type="text/css" /> 
</head>
<body class="iframe-body">
<script type="text/javascript" src="/static/lib/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="/static/lib/jquery.cookie.js"></script>
<script type="text/javascript" src="/static/js/skin.js"></script>
<script type="text/javascript" src="/static/lib/util/common.js"></script>
<script type="text/javascript"> 
	var staticFileUrl = parent.getStaticDomain();
// 	var lunarDate = parent.lunarDate;
	var animalsYear = parent.animalsYear;
	var sysServerDate = parent.sysServerDate;
	var defaultSkin = parent.defaultSkin;
	var sysTrialGamePro = parent.sysTrialGamePro;
	var gameMap = parent.gameMap;
	var games = parent.games;
	var layer = parent.layer;
	parent.UserBet.playType = "NORMAL";
</script>
<script type="text/javascript"> 
$.ajaxSetup ({
	cache: false //close AJAX cache
});
</script>
<!--  error.js要放在最后面  -->
<script type="text/javascript" src="/static/lib/util/error.js" async></script>

 <script type="text/javascript" src="/static/js/lottery/userBetInfo.js"></script>
 <div class="member-info">
   <ul class="tab" style="margin-top: 20px">
   		<li id="tm_tabs" class="tab_title02">
   		</li>
   	</ul>
   	
   	<script type="text/javascript">
   		function initTabs(){
   			var menuFormatStr='<a id="GAME_{gameId}_TAB" type="{gameId}" href="javascript:UserBetInfo.showTab({gameId});" class="{selClass}">{gameName}</a>';
   			var menuStr='';
   			var gi=0;
   			for(var g in games){
   				var selClass="";
   				var game=games[g];
   				if(game.open==0){
   					gi+=1;
   					var gameName=game.name;
   					if(game.id==50){
   						gameName="北京PK10";
						selClass = "on";
   					}
   					menuStr += menuFormatStr.format({
   						"gameId":game.id,
   						"selClass":selClass,
   						"gameName":gameName
   					});
   				}
   			}
   			$("#tm_tabs").html(menuStr);
   		}
   		initTabs();
   	</script>
   	
   	<div id="user_bet_info_configs">
	<?php
		$types=$this->getTypes();
		foreach ($types as $key => $value){
	?>
	<div id="GAME_<?=$key?>_PAGE" class="<?php if($key==50){echo('show');}else{echo('hide');}?>">
		   <table class="u-table2"> 
		     <thead> 
		      <tr > 
		       <th colspan="2">玩法</th> 
		       <th>赔率</th> 
		       <th>退水</th> 
		       <th>单注最低</th>
		       <th>单注最高</th> 
		       <th>单期最高</th> 
		      </tr> 
		     </thead> 
		     <tbody> 
			 <?php
				$groups=$this->getRows("select * from {$this->prename}played_group where type=?  order by id asc", $key);	
				
				if($groups) foreach($groups as $group){
					
					$sql="select * from {$this->prename}played where type=$key and played_groupid=? order by id asc";
					if($dataarrs=$this->getRows($sql,$group['id'])){$j=0;foreach($dataarrs as $dataarr){
			?>
		     	<tr play_id="<?=$dataarr['id']?>">
		     		<?php if($j==0){?><td rowspan="<?=count($dataarrs)?>" style="width: 100px"><?=$group['name']?></td><?php }?>
		     		<td style="width: 100px"><?=$dataarr['name']?></td>
		     		<td type="odds" ></td>
		     		<td type="rebate"></td>
		     		<td type="minMoney"></td>
		     		<td type="maxMoney"></td>
		     		<td type="maxTurnMoney"></td>
		     	</tr>
			<?php $j++; }}}?>
			</tbody>
		</table>
	</div>
	<?php }?>

 </div>
 </div>
  <script type="text/javascript">
  	UserBetInfo.init();	
  </script>
 </body>
</html>